package com.oyo.common.enums;

/**
 * @Desc: 费用类型
 * @Author: sangbowei
 * @Description:
 * @Date: 2018/8/27 19:37
 */
public enum CostType {

	SHOULD_RECEIVED(0,"应收"),
	ACTURAL_RECEIVED(1,"实收");

	int code;
	String name;

	CostType(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public static String getNameByCode(int code) {
		CostType[] types = values();
		for (CostType type : types) {
			if (type.getCode() == code) {
				return type.getName();
			}
		}
		return null;
	}

	public int getCode() {
		return code;
	}

	public String getName() {
		return name;
	}
}
